package com.tjetc.mapper;

import com.tjetc.domain.Clinic;
import com.tjetc.vo.ClinicInfoVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ClinicMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Clinic record);

    int insertSelective(Clinic record);

    Clinic selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Clinic record);

    int updateByPrimaryKey(Clinic record);

    List<Clinic> findByName(@Param("hid") Integer hid,@Param("name") String name);

    ClinicInfoVo getClinicInfo(Integer cid);

    @Delete("delete from clinic where h_id = #{id} ")
    int deleteByHid(Integer id);

    Clinic selByIdWithHos(Integer id);
    @Select("select * from clinic where h_id = #{hid} ")
    List<Clinic> getAll(Integer hid);

    List<Clinic> selAllname(String name);

    Integer add(Clinic clinic);

    List<Clinic> selByNameAndHid(@Param("name") String name,@Param("hid") Integer hid);

    @Select("select * from clinic where h_id = #{id} ")
    List<Clinic> selByHosId(Integer id);
}